<style>
    .layui-form-item label {
        width: 120px;
    }
    .classifyimg{
        margin-bottom: 20px;
        width: 672px !important;
    }
    .classifyimg-item{
        display: inline-block;
        width: 140px;
    }
    .classifyimg img{
        width: 100px;
        display: block;
    }
    .classifyimg .layui-form-radio{
        vertical-align: top;
        display: block;
        margin-bottom: 10px;
    }
    .image_storage_type .item{
        display: none;
    }
</style>
<div class="layui-card" style="padding:10px;">
    <div class="layui-tab" lay-filter="setting">
        <ul class="layui-tab-title">
            <li lay-id="platform" class="layui-this">平台设置</li>
            <li lay-id="goods">商品设置</li>
            <li lay-id="order">订单管理</li>
            <li lay-id="points">积分设置</li>
            <li lay-id="cash">提现设置</li>
            <li lay-id="other">其他设置</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form seller-alone-form" action="" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['shop_name']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="shop_name" value="{$data['shop_name']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入平台名称" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">平台名称会显示到前台，请合理输入此名称</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['shop_desc']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <textarea name="shop_desc" class="layui-textarea">{$data['shop_desc']['value']}</textarea>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin-top: 20px;">
                        <label class="layui-form-label">{$data['shop_mobile']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="shop_mobile" value="{$data['shop_mobile']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入接收通知手机号" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">前台下单时发送短信通知</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['shop_logo']['name']}：</label>
                        <div class="layui-input-inline seller-inline-6">
                            {Jshop:image id='shop_logo' value="$data['shop_logo']['value']" name="shop_logo"/}
                        </div>
                        <div class="layui-form-mid layui-word-aux"></div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['shop_default_image']['name']}：</label>
                        <div class="layui-input-inline seller-inline-6">
                            {Jshop:image id='shop_default_image' value="$data['shop_default_image']['value']" name="shop_default_image"/}
                        </div>
                        <div class="layui-form-mid layui-word-aux">系统默认图</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['store_switch']['name']}：</label>
                        <div class="layui-input-inline seller-inline-7">
                            <input type="radio" lay-filter="store_switch" name="store_switch" value="1" title="开启" {eq name="$data['store_switch']['value']" value="1" }checked{/eq}>
                            <input type="radio" lay-filter="store_switch" name="store_switch" value="2" title="不开启" {eq name="$data['store_switch']['value']" value="2" }checked{/eq}>
                        </div>
                    </div>

                    <div class="layui-form-item" style="margin-top: 20px;">
                        <label class="layui-form-label">{$data['recommend_keys']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="recommend_keys" value="{$data['recommend_keys']['value']}" lay-verify="title" autocomplete="off" placeholder="搜索发现关键字" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">多个【搜索发现】关键字请用英文逗号分割</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['cate_style']['name']}：</label>
                        <div class="layui-input-inline seller-inline-12 classifyimg">
                            <div class="classifyimg-item">
                            	<input type="radio" lay-filter="cate_style" name="cate_style" value="1" title="一级大图" {eq name="$data['cate_style']['value']" value="1" }checked{/eq}>
                                <img src="__STATIC__images/one-big.png" onclick="viewImage('__STATIC__images/one-big.png')">
                            </div>

                            <div class="classifyimg-item">
                            	<input type="radio" lay-filter="cate_style" name="cate_style" value="2" title="一级小图" {eq name="$data['cate_style']['value']" value="2" }checked{/eq}>
                                <img src="__STATIC__images/one-small.png" onclick="viewImage('__STATIC__images/one-small.png')">
                            </div>

                            <div class="classifyimg-item">
                            	<input type="radio" lay-filter="cate_style" name="cate_style" value="3" title="二级小图" {eq name="$data['cate_style']['value']" value="3" }checked{/eq}>
                                <img src="__STATIC__images/two-small.png" onclick="viewImage('__STATIC__images/two-small.png')">
                            </div>
                            <div class="layui-form-mid layui-word-aux list-tag">
                                1、一级大图分类图标尺寸建议：350px*150px<br/>
                                2、一级小图分类图标尺寸建议：105px*105px<br/>
                                3、二级分类图标尺寸建议：60px*60px<br/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['cate_style_h5']['name']}：</label>
                        <div class="layui-input-inline seller-inline-12 classifyimg">
                            <div class="classifyimg-item">
                                <input type="radio" lay-filter="cate_style_h5" name="cate_style_h5" value="1" title="样式一" {eq name="$data['cate_style_h5']['value']" value="1" }checked{/eq}>
                                <img src="__STATIC__images/cate-h5-one.png" onclick="viewImage('__STATIC__images/cate-h5-one.png')">
                            </div>

                            <div class="classifyimg-item">
                                <input type="radio" lay-filter="cate_style_h5" name="cate_style_h5" value="2" title="样式二" {eq name="$data['cate_style_h5']['value']" value="2" }checked{/eq}>
                                <img src="__STATIC__images/cate-h5-two.png" onclick="viewImage('__STATIC__images/cate-h5-two.png')">
                            </div>

                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;</label>
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save" style="height: 37px;padding: 0 27px;font-size: 14px;">保存</button>
                        </div>
                    </div>
                </form>
            </div>

            <div class="layui-tab-item">
                <form class="layui-form seller-alone-form" action="" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['goods_stocks_warn']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="goods_stocks_warn" value="{$data['goods_stocks_warn']['value']}" lay-verify="title" autocomplete="off" placeholder="数量" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">商品中只要有货品库存低于报警数量，就会在后台提示</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;</label>
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save" style="height: 37px;padding: 0 27px;font-size: 14px;">保存</button>
                        </div>
                    </div>
                </form>
            </div>

            <div class="layui-tab-item">
                <form class="layui-form seller-alone-form" action="" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['order_cancel_time']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="order_cancel_time" value="{$data['order_cancel_time']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">未付款订单取消的时间间隔，单位为天</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['order_complete_time']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="order_complete_time" value="{$data['order_complete_time']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">已付款的订单完成的时间间隔，单位为天</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['order_autoSign_time']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="order_autoSign_time" value="{$data['order_autoSign_time']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">发货后的订单自动确认收货时间,单位为天</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['order_autoEval_time']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="order_autoEval_time" value="{$data['order_autoEval_time']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">确认收货后的订单自动评价时间间隔,单位为天</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['remind_order_time']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="remind_order_time" value="{$data['remind_order_time']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">订单催付款时间,单位为小时</div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['reship_name']['name']}：</label>
                        <div class="layui-input-inline seller-inline-3">
                            <input type="text" name="reship_name" value="{$data['reship_name']['value']}" lay-verify="title" autocomplete="off" placeholder="收货人名称" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">用户退货时的收货人姓名</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['reship_mobile']['name']}：</label>
                        <div class="layui-input-inline seller-inline-3">
                            <input type="text" name="reship_mobile" value="{$data['reship_mobile']['value']}" lay-verify="title" autocomplete="off" placeholder="收货人手机号码" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">用户退货时的收货人联系方式</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['reship_area_id']['name']}：</label>
                        <div class="layui-input-inline seller-inline-4 address-class">
                            {Jshop:area name='reship_area_id' value="data['reship_area_id']['value']" class="select-address" /}
                        </div>
                        <div class="layui-form-mid layui-word-aux">退货的邮寄地区</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['reship_address']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="reship_address" value="{$data['reship_address']['value']}" lay-verify="title" autocomplete="off" placeholder="退货地址" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">退货的详细地址</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;</label>
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save" style="height: 37px;padding: 0 27px;font-size: 14px;">保存</button>
                        </div>
                    </div>

                </form>
            </div>

            <div class="layui-tab-item">
                <form class="layui-form seller-alone-form" action="" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['point_switch']['name']}：</label>
                        <div class="layui-input-inline seller-inline-7">
                            <input type="radio" lay-filter="point_switch" name="point_switch" value="1" title="开启" {eq name="$data['point_switch']['value']" value="1" }checked{/eq}>
                            <input type="radio" lay-filter="point_switch" name="point_switch" value="2" title="不开启" {eq name="$data['point_switch']['value']" value="2" }checked{/eq}>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['point_discounted_proportion']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="number" name="point_discounted_proportion" value="{$data['point_discounted_proportion']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input" min="0">
                        </div>
                        <div class="layui-form-mid layui-word-aux">多少积分可以折现1元人民币</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['orders_point_proportion']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="number" name="orders_point_proportion" value="{$data['orders_point_proportion']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input" max="100" min="0">
                        </div>
                        <div class="layui-form-mid layui-word-aux">（%）单个订单积分折现最大百分比</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['orders_reward_proportion']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="number" name="orders_reward_proportion" value="{$data['orders_reward_proportion']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input" min="0">
                        </div>
                        <div class="layui-form-mid layui-word-aux">订单多少人民币奖励1个积分</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['sign_point_type']['name']}：</label>
                        <div class="layui-input-inline seller-inline-7">
                            <input type="radio" lay-filter="sign_point_type" name="sign_point_type" value="1" title="固定奖励" {eq name="$data['sign_point_type']['value']" value="1" }checked{/eq}>
                            <input type="radio" lay-filter="sign_point_type" name="sign_point_type" value="2" title="随机奖励" {eq name="$data['sign_point_type']['value']" value="2" }checked{/eq}>
                        </div>
                        <input type="hidden" id="sign_point_type" value="{$data['sign_point_type']['value']}">
                    </div>

                    <div class="sign-random">
                        <div class="layui-form-item">
                            <label class="layui-form-label">{$data['sign_random_min']['name']}：</label>
                            <div class="layui-input-inline seller-inline-2">
                                <input type="text" name="sign_random_min" value="{$data['sign_random_min']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">签到随机最小奖励积分</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">{$data['sign_random_max']['name']}：</label>
                            <div class="layui-input-inline seller-inline-2">
                                <input type="text" name="sign_random_max" value="{$data['sign_random_max']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">签到随机最大奖励积分</div>
                        </div>
                    </div>

                    <div class="sign-fixed">
                        <div class="layui-form-item">
                            <label class="layui-form-label">{$data['first_sign_point']['name']}：</label>
                            <div class="layui-input-inline seller-inline-2">
                                <input type="text" name="first_sign_point" value="{$data['first_sign_point']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">起始签到奖励积分</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">{$data['continuity_sign_additional']['name']}：</label>
                            <div class="layui-input-inline seller-inline-2">
                                <input type="text" name="continuity_sign_additional" value="{$data['continuity_sign_additional']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">连续签到追加积分</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">{$data['sign_most_point']['name']}：</label>
                            <div class="layui-input-inline seller-inline-2">
                                <input type="text" name="sign_most_point" value="{$data['sign_most_point']['value']}" lay-verify="title" autocomplete="off" placeholder="请输入正整数" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">连续签到奖励积分单日上限</div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;</label>
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save" style="height: 37px;padding: 0 27px;font-size: 14px;">保存</button>
                        </div>
                    </div>
                </form>
            </div>

            <div class="layui-tab-item">
                <form class="layui-form seller-alone-form" action="" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['tocash_money_low']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="tocash_money_low" value="{$data['tocash_money_low']['value']}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">最低提现标准，默认0不限制</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['tocash_money_rate']['name']}：</label>
                        <div class="layui-input-inline seller-inline-2">
                            <input type="text" name="tocash_money_rate" value="{$data['tocash_money_rate']['value']}" lay-verify="title" autocomplete="off" placeholder="%" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">提现费率，默认0% 没有费率</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;</label>
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save" style="height: 37px;padding: 0 27px;font-size: 14px;">保存</button>
                        </div>
                    </div>
                </form>
            </div>

            <div class="layui-tab-item">
                <form class="layui-form seller-alone-form" action="" method="post">

                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"> <legend>腾讯地图</legend></fieldset>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['qq_map_key']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="qq_map_key" value="{$data['qq_map_key']['value']}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">腾讯地图key，申请地址：https://lbs.qq.com/</div>
                    </div>
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"> <legend>快递100</legend></fieldset>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['kuaidi100_customer']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="kuaidi100_customer" value="{$data['kuaidi100_customer']['value']}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">快递100公司编码，申请地址：https://www.kuaidi100.com</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['kuaidi100_key']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="kuaidi100_key" value="{$data['kuaidi100_key']['value']}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">快递100授权key，申请地址：https://www.kuaidi100.com</div>
                    </div>
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"> <legend>图片存储</legend></fieldset>
                    <div class="layui-form-item">
                        <label class="layui-form-label">{$data['image_storage_type']['name']}：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <select name="image_storage_type" lay-filter="image_storage_type">
                                <option value="Local" {if condition="$data['image_storage_type']['value'] eq 'Local' "} selected {/if} >本地</option>
                                <option value="Aliyun" {if condition="$data['image_storage_type']['value'] eq 'Aliyun' "} selected {/if} >阿里云OSS</option>
                            </select>
                        </div>
                        <div class="layui-form-mid layui-word-aux">图片保存方式</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">绑定域名：</label>
                        <div class="layui-input-inline seller-inline-5">
                            <input type="text" name="image_storage_params[domain]" value="{if $data['image_storage_params']['value']}{$data['image_storage_params']['value']['domain']}{/if}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">图片分离时使用，使用阿里云OSS时也尽量绑定域名，例如：https://image.jihainet.com</div>
                    </div>
                    <div class="image_storage_type ">
                        <div class="item Aliyun" {if condition="$data['image_storage_type']['value'] eq 'Aliyun' "} style="display: block" {/if}>
                            <div class="layui-form-item">
                                <label class="layui-form-label">AccessKeyId：</label>
                                <div class="layui-input-inline seller-inline-5">
                                    <input type="text" name="image_storage_params[accessKeyId]" value="{if $data['image_storage_params']['value']}{$data['image_storage_params']['value']['accessKeyId']}{/if}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">阿里云AccessKeyId，申请地址：阿里云用户AccessKey控制台地址：https://usercenter.console.aliyun.com/#/manage/ak</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">AccessKeySecret：</label>
                                <div class="layui-input-inline seller-inline-5">
                                    <input type="text" name="image_storage_params[accessKeySecret]" value="{if $data['image_storage_params']['value']}{$data['image_storage_params']['value']['accessKeySecret']}{/if}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">阿里云accessKeySecret</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">存储节点：</label>
                                <div class="layui-input-inline seller-inline-5">
                                    <input type="text" name="image_storage_params[endpoint]" value="{if $data['image_storage_params']['value']}{$data['image_storage_params']['value']['endpoint']}{/if}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">阿里云OSS的 endpoint</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">空间名称：</label>
                                <div class="layui-input-inline seller-inline-5">
                                    <input type="text" name="image_storage_params[bucket]" value="{if $data['image_storage_params']['value']}{$data['image_storage_params']['value']['bucket']}{/if}" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">阿里云OSS的 bucket</div>
                            </div>

                        </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;</label>
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save" style="height: 37px;padding: 0 27px;font-size: 14px;">保存</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use(['form', 'element'], function() {
        var form = layui.form, element = layui.element;

        //显示当前tab
        if (location.hash) {
            element.tabChange('setting', location.hash.replace(/^#/, ''));
        }
        element.on('tab(setting)', function () {
            var othis = $(this), layid = othis.attr('lay-id');
            if (layid) {
                location.hash = layid;
            }
        });

        //保存商品
        form.on('submit(save)', function(data) {
            formData = data.field;
            if (!formData) {
                layer.msg('请先完善数据', {
                    time: 1300
                }); //layer.msg(JSON.stringify(data.field));
                return false;
            }
            $.ajax({
                url: '{:url("Setting/index")}',
                type: 'post',
                data: formData,
                dataType: 'json',
                success: function(e) {
                    if (e.status === true) {
                        layer.msg('保存成功');
                    } else {
                        layer.msg(e.msg, {
                            time: 1300
                        });
                    }
                }
            });
            return false;
        });

        //积分奖励类型切换
        var type = $("#sign_point_type").val();
        if (type == 1) {
            $(".sign-random").hide();
            $(".sign-fixed").show();
        } else {
            $(".sign-random").show();
            $(".sign-fixed").hide();
        }
        form.on('radio(sign_point_type)', function(data) {
            if (data.value == 1) {
                $(".sign-random").hide();
                $(".sign-fixed").show();
            } else {
                $(".sign-random").show();
                $(".sign-fixed").hide();
            }
        });
        //存储引擎切换
        form.on('select(image_storage_type)', function(data) {
            $(".image_storage_type .item").hide(10);
            $("."+data.value).show(10);
        });

    });
</script>